use std::sync::{Arc, Mutex};
use lazy_static::lazy_static;

pub mod llog;
pub mod ltools;
pub mod linit;
pub mod lexpose;
pub mod ltokio;

pub mod lauto_config;

pub mod lerror;

pub mod ltcp;

pub mod c_bindings;
pub mod build;


lazy_static!{
    static ref NTP_SPACE:Arc<Mutex<i128>> = Arc::new(Mutex::new(0));
}



#[macro_export]
macro_rules! lipo_info {
    ($x:expr) => (
        crate::lexpose::print_log("INFO", $x)
    );
}

#[macro_export]
macro_rules! lipo_error {
    ($x:expr) => (
        crate::lexpose::print_log("ERROR", $x)
    );
}

#[macro_export]
macro_rules! lipo_warn {
    ($x:expr) => (
        crate::lexpose::print_log("WARN", $x)
    );
}







pub fn add(left: usize, right: usize) -> usize {
    left + right
}

#[cfg(test)]
mod tests {
    use super::*;

    #[test]
    fn it_works() {
        let result = add(2, 2);
        assert_eq!(result, 4);
    }
}
